﻿using System;
using Egeye.AddIn;
using ServiceTest;

namespace ServiceClientTest
{
    [Serializable]
    [AddIn("ServiceClientTest")]
    public class ServiceClientAddIn : AddInBase
    {
        public override void Start(IBundleContext context)
        {
            HelloService hello = context.GetService<HelloService>();

            if (hello != null)
            {
                string text = hello.SayHello();
                Console.ForegroundColor = ConsoleColor.Green;
                Console.WriteLine("Say hello:{0}", text);
                Console.ResetColor();
            }
        }

        public override void Stop(IBundleContext context)
        {
            
        }
    }
}
